import time

import pyautogui as p
import pyperclip

time.sleep(3)
start = time.time()
while time.time() - start < 10:
    hands = list(p.locateAllOnScreen("hand.png", confidence=0.9)) # 获取点赞的位置
    print(hands)
    if len(hands) == 0: # 如果没有赞就往下划
        p.scroll(-100)
    else:
        for hand in hands:
            x, y = p.center(hand) # 获取赞的坐标
            p.click(x, y) # 点赞

